<?php get_header();?>

<script type="text/javascript">
	$(document).ready(function()
	{
		//var pageurl = window.location + "test";
		document.getElementById("list-hotel").innerHTML = "Loading...";
		if (window.XMLHttpRequest)
		  {// code for IE7+, Firefox, Chrome, Opera, Safari
		  	xmlhttp=new XMLHttpRequest();
		  }
		else
		  {// code for IE6, IE5
		  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
		  }
		xmlhttp.onreadystatechange=function()
		  {
		  	if (xmlhttp.readyState==4 && xmlhttp.status==200)
		  	{			  		
		    	document.getElementById("list-hotel").innerHTML = xmlhttp.responseText;
		    }
		  }			 
		xmlhttp.open("GET",window.location + "test",true);
		xmlhttp.send();
		//return false;

		$("#thanhbinh").click(function()
				{
			alert("dfas");
					
				});	
		
		$(".testajax").click(function()
		{
			var title = $(this).attr('title');
			
			document.getElementById("list-hotel").innerHTML = "Loading...";
			if (window.XMLHttpRequest)
			  {// code for IE7+, Firefox, Chrome, Opera, Safari
			  	xmlhttp=new XMLHttpRequest();
			  }
			else
			  {// code for IE6, IE5
			  xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
			  }
			xmlhttp.onreadystatechange=function()
			  {
			  	if (xmlhttp.readyState==4 && xmlhttp.status==200)
			  	{			  		
			    	document.getElementById("list-hotel").innerHTML = xmlhttp.responseText;
			    }
			  }			 
			xmlhttp.open("GET",title,true);
			xmlhttp.send();
			return false;
		});		
	});	
</script>
<?php
global $paged;
$mypage = 0;
if($paged>0)
	$mypage = $paged; 
?>
<ul style="list-style: none;">
	<li style="float: left; margin-right: 10px;"><a class="testajax" title="<?php bloginfo();?>/test?page=1" href="">abc</a></li>
	<li style="float: left; margin-right: 10px;"><a class="testajax" title="<?php bloginfo();?>/test?page=2" href="">def</a></li>
	<li style="float: left; margin-right: 10px;"><a class="testajax" title="<?php bloginfo();?>/test?page=3" href="">ghi</a></li>
	
</ul>
<div id="list-hotel">
thanhbinh
</div>
<?php get_footer();?>